import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'virtual:svg-icons-register'
import '@/styles/index.scss';
import router from './router'
//引入自定义插件对象:注册整个项目全局组件
import gloalComponent from '@/components';
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//引入仓库
import pinia from './store'
//引入路由鉴权文件
import './permisstion';
// main.ts
// 如果只想导入css变量
import 'element-plus/theme-chalk/dark/css-vars.css';
const app=createApp(App)
app.use(ElementPlus,{
    locale:zhCn
});

//安转仓库
app.use(pinia);

//注册路由模板
app.use(router);


// console.log(gloalComponent)
app.use(gloalComponent);

//引入自定义指令文件
import { isHasButton } from './directive/has'
isHasButton(app);

app.mount('#app')
